﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp9
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Blue;
            Cat cat = new Cat("阿猫");
            cat.eat();
            Climb(cat);
            Console.WriteLine("-----------------");
            Console.ForegroundColor = ConsoleColor.Green;
            Dog dog = new Dog("傻狗");
            dog.eat();
            Climb(dog);
            Swmin(dog);
            Console.WriteLine("-----------------");
            Console.ForegroundColor = ConsoleColor.White;
            Duck duck = new Duck("唐老鸭");
            duck.eat();
            Swmin(duck);
            Console.WriteLine("-----------------");
            Console.ForegroundColor = ConsoleColor.Red;
            Monkey monkey = new Monkey("老六");
            monkey.eat();
            Climb(monkey);
        }

        static void Climb(Iclimb iclimb)
        {
            iclimb.climb();
        }

        static void Swmin(Iswmin iswmin) 
        {
            iswmin.swmin();
        }
    }
}
